home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / FZNUM.ZIP / fuzzy / confint / test01.cc < prev   
Encoding:
C/C++ Source or Header  |  1994-10-03  |  896 b   |  41 lines

  1. #include "confint.h"
  2.  
  3. int main()
  4.  
  5. {
  6.    float fValue1;
  7.    float fValue2;
  8.    ConfInt ciArray[ 2];
  9.  
  10.    cout << "\n\n\tConfidence interval type\n"
  11.     << "\tOverloaded subscripting operator test\n";
  12.  
  13.    cout << "\nFirst interval: lower bound = ";
  14.    cin >> fValue1;
  15.    cout << "First interval: upper bound = ";
  16.    cin >> fValue2;
  17.    ciArray[ 0] = ConfInt( fValue1, fValue2);
  18.  
  19.    cout << "\nSecond interval: lower bound = ";
  20.    cin >> fValue1;
  21.    cout << "Second interval: upper bound = ";
  22.    cin >> fValue2;
  23.    ciArray[ 1] = ConfInt( fValue1, fValue2);
  24.  
  25.    cout << "\nSingleton value = ";
  26.    cin >> fValue1;
  27.  
  28.    cout << "\n" << fValue1 << " is "
  29.         << ( ciArray[ 0][ fValue1] ? "" : "not ")
  30.         << "in " << ciArray[ 0] << "\n";
  31.  
  32.    cout << "\n" << fValue1 << " is "
  33.         << ( ciArray[ 1][ fValue1] ? "" : "not ")
  34.         << "in " << ciArray[ 1] << "\n";
  35.  
  36.    cout << "\n\n";
  37.  
  38.    return 0;
  39. }
  40.  
  41.